Page({
    data:{
        title:"意外",
        time:"2013-11-11",
        singer:"薛之谦",
        url:"http://p2.music.126.net/ywVjRpbu9KpcBQh9KJz2HA==/109951164499974026.jpg?param=177y177",
        list:[
            {
                id:27808044,
                videoSrc:"http://link.hhtjim.com/163/27808044.mp3",
                songname:"丑八怪",
                name:"薛之谦",
            },
            {
                id:27890306,
                videoSrc:"http://link.hhtjim.com/163/27890306.mp3",
                songname:"意外",
                name:"薛之谦",
            },
            {
                id:27955653,
                videoSrc:"http://link.hhtjim.com/163/27955653.mp3",
                songname:"你还要我怎样",
                name:"薛之谦",
            },
            {
                id:27955656,
                videoSrc:"http://link.hhtjim.com/163/27955656.mp3",
                songname:"有没有",
                name:"薛之谦",
            },
            {
                id:27955651,
                videoSrc:"http://link.hhtjim.com/163/27955651.mp3",
                songname:"潮流季",
                name:"薛之谦",
            },
            {
                id:27955652,
                videoSrc:"http://link.hhtjim.com/163/27955652.mp3",
                songname:"等我回家",
                name:"薛之谦",
            },
            {
                id:27955654,
                videoSrc:"http://link.hhtjim.com/163/27955654.mp3",
                songname:"其实",
                name:"薛之谦",
            },
            {
                id:27955658,
                videoSrc:"http://link.hhtjim.com/163/27955658.mp3",
                songname:"方圆几里",
                name:"薛之谦",
            },
            {
                id:27955657,
                videoSrc:"http://link.hhtjim.com/163/27955657.mp3",
                songname:"方圆几里（吉他版）",
                name:"薛之谦",
            },
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})